package com.mwcz.hot.payment.service;

import com.mwcz.hot.front.request.OrderPayRequest;
import com.mwcz.hot.front.response.OrderPayResultResponse;
import com.mwcz.hot.payment.vo.wechat.CreateOrderResponseVo;
import com.mwcz.hot.store.model.StoreOrder;

/**
 * 订单支付
 *
 * @author Mr.Bai
 * @since 2021-06-18
 */
public interface OrderPayService {
    CreateOrderResponseVo payOrder(Integer orderId, String fromType, String clientIp);

    boolean success(String orderId, Integer userId, String payType);

    void afterPaySuccess();

    /**
     * 支付成功处理
     *
     * @param storeOrder 订单
     */
    Boolean paySuccess(StoreOrder storeOrder);

    /**
     * 余额支付
     *
     * @return
     */
    Boolean yuePay(StoreOrder storeOrder);

    /**
     * 订单支付
     *
     * @param orderPayRequest 支付参数
     * @param ip              ip
     * @return
     */
    OrderPayResultResponse payment(OrderPayRequest orderPayRequest, String ip);

    /**
     * 订单支付
     * @param ip              ip
     * @return
     */
    OrderPayResultResponse paymentAdmin(String orderNo, String ip);
}
